package com.test.designpattern;

import com.test.designpattern.chainOfResponsibility.demo1.AuditChainExcutor;
import com.test.designpattern.chainOfResponsibility.demo2.OptHandlerChain;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class ChainOfResponsibility {
    @Autowired
    private AuditChainExcutor auditChainExcutor;
    @Autowired
    private OptHandlerChain optHandlerChain;

    @Test
    public void demo1(){
        auditChainExcutor.startChain("123");
    }

    @Test
    public void demo2(){
        optHandlerChain.process("456");
    }
}
